package com.qf.controller;

import com.qf.service.TenderInfoUpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// 手动触发更新（可在Controller中创建接口）
@RestController
@RequestMapping("/tender")
public class TenderController {

    @Autowired
    private TenderInfoUpdateService tenderInfoUpdateService;

    @PostMapping("/refresh-fields")
    public String refreshFields() {
        tenderInfoUpdateService.batchUpdateFields();
        return "更新任务已启动，请查看控制台日志";
    }
}
